﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    <meta charset="utf-8" />
	 <link type="text/css" rel="stylesheet" href="~/Content/Login/buildnet/css/reset.css" />
    <link type="text/css" rel="stylesheet" href="~/Content/Login/buildnet/css/style.css" />
	<link type="text/css" rel="stylesheet" href="http://www.buildnet.cn/Areas/main/Content/css/partialHeader.css" />
    <link type="text/css" rel="stylesheet" href="~/Content/Login/buildnet/css/function.css" />

    <script type="text/javascript" src="~/Content/jquery-1.11.1.min.js"></script>
</head>
<body>

@*<div class="g-tp">
	<div class="mTop">
            <p class="f-fr">
                <a href="http://www.buildnet.cn/register">会员注册</a>
                <a href="#">会员登录</a> <span>服务热线：400-706-0909</span>
            </p>
            <ul>
                <li><a target="_blank" href="http://www.buildnet.cn/">行业导航</a></li>
                <li><a target="_blank" href="http://news.buildnet.cn/NewsAndEvents/NewList.aspx?ID=31&amp;GetType=Type">行业动态</a></li>
                <li><a target="_blank" href="http://gc.buildnet.cn/">工程电讯</a></li>
                <li><a target="_blank" href="http://ck.buildnet.cn">绿色材库</a></li>
                <li><a target="_blank" href="http://news.buildnet.cn/NewsAndEvents/NewsListG.aspx">光荣榜</a></li>
                <li><a target="_blank" href="http://news.buildnet.cn/NewsAndEvents/NewsListB.aspx">曝光台</a></li>
                <li><a target="_blank" href="http://news.buildnet.cn/IndustryInformation/ShowInformations.shtml">会议展览</a></li>
            </ul>
        </div>
</div>*@
<div class="g-hd">
	<div class="m-hd">
    	@*<a class="logo" href="http://gc.buildnet.cn" title="建设网工程信息"><img src="http://www.buildnet.cn/Areas/main/Content/image/hd-logo.jpg" alt="建设网工程信息"></a>*@
@*        <ul class="m-nav">
        	<li class="crt" nav="gcdx"><a target="_blank" title="工程电讯" href="http://gc.buildnet.cn">工程电讯</a></li>
            <li nav="lsck"><a target="_blank" title="绿色材库" href="http://ck.buildnet.cn">绿色材库</a></li>
            <li nav="iask"><a target="_blank" title="互助" href="http://www.buildnet.cn/iask">互助</a></li>
			<li nav="contact"><a target="_blank" title="人脉" href="http://www.buildnet.cn/contact">人脉</a></li>
        </ul>
*@    </div>
</div>



<div class="wrap" style=" padding:50px 0 100px;">
	<div class="buildQQ">
		<div class="tipsSuc"><img src="~/Content/Login/buildnet/img/suc.png" />您已经成功关联账号：<i>@ViewBag.Nick</i>，请输入手机号完成绑定</div>
    <form  id="subForm">
    <input type="hidden" value="@ViewBag.Nick" name="nick" />
    <input type="hidden" value="@ViewBag.figureurl_1" name="imgurl" />
    <div class="m-form mb10">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td></td>
				<td class="f-fs3" colspan="2">请输入手机号完成账户绑定，即刻体验建设网完整功能</td>
			</tr>
			<tr>
				<td class="f-tar"><i class="f-c-red">* </i>开通服务</td>
				<td colspan="2">
                	<input class="inpCheck" id="a1"  checked="checked" name="services" value="gcdx" type="checkbox" /><label for="a1">工程电讯</label>
					<input class="inpCheck" id="a2" name="services" value="lsck" type="checkbox" /><label for="a2">绿色材库</label>
				</td>
			</tr>
            <tr>
                <td class="f-tar" width="25%"><i class="f-c-red">* </i>手机号</td>
                <td>
                    <input class="u-inpTxt span9" type="text" id="PhoneNo" name="phone" />
                </td>
                <td width="25%">
                    <p id="phone_tips"></p>
                </td>
            </tr>
            <tr>
                <td class="f-tar"><i class="f-c-red">* </i>验证码</td>
                <td>
                    <input class="u-inpTxt span5" type="text" name="codeValue" id="codeValue" />
                    <input type="hidden" name="hidcodeValue" id="hidcodeValue" value="" />
                    <input class="u-inpBtn bgd2e ml2" type="button" value="获取校验码" id="vcodebtn" name="vcodebtn" />
                </td>
                <td>
                    <p id="Code_tips"></p>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <input class="u-inpBtn bge69" type="submit" value="确认绑定"/>
                    <input class="u-inpBtn bge2e ml5" type="button" onclick='cancleOper(this);' value="放弃绑定"/>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
	</div>
</div>

<div class="g-ft">
        <div class="m-foot f-pr">
            <a target="_blank" href="#" class=" logo">
                <img height="30" alt="天辰TCBCI" src="/Content/Login/buildnet/img/tcbci.png"></a>
            <div class="con">
                <div class="footNav">
                    <a target="_blank" href="http://www.tcbci.com/tcbci/About.shtml">关于我们</a>|<a target="_blank" href="http://www.buildnet.cn/aboutus/maps.shtml">网站地图</a>|<a href="http://passport.weibo.com/visitor/visitor?a=enter&amp;url=http%3A%2F%2Fweibo.com%2F2443901437&amp;_rand=1422436364.7726 " target="_blank">
                            官方微博</a>|<a href="http://www.tcbci.com/tcbci/Contact.shtml" target="_blank">联系我们</a>|<a target="_blank" href="http://www.tcbci.com/aboutus/fwtk.shtml">服务条款</a></div>
                <p>
                    备案号/经营许可证号：京ICP证020427号  京公网安备11010802009807号</p>
                <p>
                    TCBCI All Rights Reserved 2001-2015</p>
            </div>
        </div>
    </div>

    <script type="text/javascript">
    $(function () {

        $("#subForm").submit(function(){
            if(!$("#a1").prop("checked") && !$("#a2").prop("checked")){
                alert("请至少选择一种服务！");
                return false;
            }
            $.post("@Url.Action("Bind")",$("#subForm").serialize(),function(data){
                if(data.s == 0){
                    location.href = data.url;
                }else{
                    alert(data.msg);
                }
            });
            return false;
        });
        $("#vcodebtn").removeAttr("disabled"); 
        $("#vcodebtn").bind("click", function () {
            $("#phone_tips").html();
            $("#Code_tips").html();
            var PhoneNo = $("#PhoneNo").val();
            if ($.trim(PhoneNo) == '' || $.trim(PhoneNo).length == 0) {
                $("#phone_tips").html("<img src='../Content/Login/ebulletin/img/error.gif'/><span style='color:red'>@Html._T("请先输入手机号")</span>");
                return;
            }
            var ismobile = /^(?:13\d|15\d|18\d)\d{5}(\d{3}|\*{3})$/; //手机号码验证规则
            if (ismobile.test(PhoneNo)) {
                $("#phone_tips").html("<img src='../Content/Login/ebulletin/img/ok.gif'/>");
            } else {
                $("#phone_tips").html("<img src='../Content/Login/ebulletin/img/error.gif'/><span style='color:red'>@Html._T("手机号码格式不正确")</span>");
                return;
            }
            $.post("@Url.Action("MobileCode","Auth")", {PhoneNo:PhoneNo}, function (data) {
                if(data.s != 0){
                    $("#Code_tips").html("<img src='../Content/Login/ebulletin/img/error.gif'/><span style='color:red'>"+data.msg+"</span>");
                }
                else{
                     var count = 60;
                     $("#vcodebtn").attr('disabled',"true");
                     $("#vcodebtn").val(count + "@Html._T("秒后重新发送")");
                     var countdown = setInterval(function(){
                        $("#vcodebtn").attr('disabled',"true");
                        $("#vcodebtn").val(count + "@Html._T("秒后重新发送")");
                        if (count == 0) { 
                            $("#vcodebtn").removeAttr("disabled"); 
                            $("#vcodebtn").val("@Html._T("重新发送")");
                            clearInterval(countdown);
                        }
                        count--;
                     }, 1000);
                }
            });
        });
    });
</script>
</body>
</html>
